<html lang="en">

<head th:include="templates/common :: header" />

<body>
	<div class="container" style="margin-top: 40px;">
		<div th:include="templates/common :: menu"></div>
		
		<div class="panel panel-primary">
			<div class="panel-heading" th:text="#{'groups.'+ ${type} + '.label'}"></div>
	  		<div class="panel-body">
				<form id="groupEditForm" action="#" th:object="${groupDTO}" th:action="@{'/groups/' + ${type}}" method="post" class="form-horizontal">
				
						<div class="form-group"> 
						<span th:if="${#fields.hasErrors('groupName')}" th:errors="*{groupName}"/> 
							<label class="col-lg-2 control-label" th:text="#{groups.table.group.name}">GroupName</label>
							<div class="col-lg-2">
								<input id="hiddenID" type="hidden" th:field="*{id}" />
								<input id="groupName" type="text" class="form-control" th:field="*{groupName}" th:placeholder="#{groups.table.group.name}"/>
							</div>
						</div>
		
						 <div class="form-group">
							<label class="col-lg-2 control-label" th:text="#{groups.table.group.name.numeric}">GroupName</label>
							<div class="col-lg-2">
								<input id="numericGroupName" type="text" class="form-control" th:field="*{numericGroupName}"  th:placeholder="#{groups.table.group.name.numeric}" />
							</div>
						</div>
		
						<div class="form-group">
							<div class="col-lg-offset-2 col-lg-2">
								<button id="submitGroupForm" type="submit" class="btn btn-primary btn-block" th:text=" ${type} == 'create' ?  #{groups.create}: #{app.update.data}">Change password</button>
							</div>
						</div>
				</form>
			</div>
		</div>
	</div>
</body>
</html>